<?php require '../public/system/headers/headers.php';?>
<?php $this->headLink()->appendStylesheet($this->websiteUrl . 'system/css/seotoaster.css'); ?>
<?php $this->headLink()->appendStylesheet($this->websiteUrl .'system/js/thickbox/thickbox.css'); ?>
<?php echo $this->headLink(); ?>
<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/jquery/jquery.js'); ?>
<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/thickbox/thickbox.js'); ?>
<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/system.js'); ?>
<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/php.js'); ?>
<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/redirect/redirect.js'); ?>
<?php echo $this->headScript(); ?>
 

<div id="seotoaster" class="admineditredirect">
	 <div class="close_window" onclick="parent.tb_remove();"></div>
<div id="redirect-errors" class="errors">
	<ul>
    <li id="redirect-exists-error">Former URL already exists.</li>
    <li id="oldurl-empty-error">Former URL field can't be empty.</li>
    <li id="oldurl-regex-error" class="error">Former URL field must contain only letters,digits, '.', '/','-'.</li>
    <li id="oldurl-domain-error" class="error">Former URL field must be from your webiste domain.</li>
    <li id="oldurl-emptypage-error" class="error">Former URL has to have certain page url.</li>
    <li id="oldurl-length-error" class="error">Former URL field must be No more that 255 characters.</li>
	</ul>
</div>
         <?php echo $this->form; ?>
   
<ul class="ultable" style="margin-top:20px;margin-bottom:40px;">
	<li style="margin-left:25px;width:360px;">{%Old URL:%}</li>
	<li style="width:380px;">{%New URL:%}</li>
	<li style="width:30px;">{%Del%}</li>
</ul>


 <div class="redir" id="redir" style="height:370px;clear:both;overflow-y:auto;overflow-x:hidden;">

<?php if(isset($this->redirectsObjectsArray) && !empty($this->redirectsObjectsArray)) {
    foreach($this->redirectsObjectsArray as $redirectObj){
        ?>
<div class="redirbord" id="redirect-<?php echo $redirectObj->id_page;?>">
  <div class="checkboxes"><input type="checkbox" id="<?php echo $redirectObj->id_page;?>" /></div>
  <div class="redirecturl"><?php echo $redirectObj->original_old_url;?><span>&rarr;</span></div>
  <div class="redirecturlimg"><?php echo $redirectObj->new_url;?><a href="javascript:void(0);"
  onclick="deleteRedirect('<?php echo $redirectObj->id_page;?>');" title="Delete redirect.">
  <img src="<?php echo $this->websiteUrl;?>system/images/ico_delete.gif" alt="delete"/>
  </a>
  </div>
  <p style="clear:both;"></p>
</div>

 
<?php } }?>
 <input type="hidden" id="hid-main-wsurl" name="hid-main-wsurl" value="<?php echo $this->websiteUrl; ?>" />
</div>
   

<?php if(isset($this->errorElements)){  ?>
    <div class="errors" >Errors<?php echo $this->errorElements;?></div>
    <?php } ?>

</div>

